#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os

os.environ["PIP_DISABLE_PIP_VERSION_CHECK"] = "True"
import re
import sys

from pip._internal.cli.main import main

if __name__ == "__main__":
    if len(sys.argv) >= 2 and sys.argv[1] == "install":
        sys.argv.insert(2, "--target")
        sys.argv.insert(3, f'{os.path.join(os.environ["OMD_ROOT"])}/local/lib/python3')
    sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0])
    sys.exit(main())
